import requests
import os
headers = {
        'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'
                      ' Chrome/68.0.3423.2 Safari/537.36'
        }

kv = {'wd':'python'}
url = 'https://ip.cn/index.php?ip=114.242.250.52'
root = 'https://ip.cn/index.php?ip='
print('Please input your ip address:')
ip = input()
try:
    r = requests.get(root+ip, headers=headers)
    print(r.status_code)
except:
    print('fail')

